<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app">

    <h1 v-if="isShow">太原2003</h1>

    <button @click="isShow=!isShow">显示/隐藏</button>
    <hr>
    <a :[attrname]="attrVal">百度</a>
    <hr>
    <!-- <a v-bind:['my'+attrname]="attrVal">百度</a> -->
    <a v-bind:[getname]="attrVal">百度</a>

  </div>
  <script>

    var vm = new Vue({
      el: "#app",
      data: {
        isShow: true,
        attrname: "id",
        attrVal: "link"
      },
      computed: {
        getname() {
          return 'my' + this.attrname;
        }
      }
    })
  </script>

</body>

</html>